/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Shared Source License
* for DSL Editor PowerToy. A copy of the license can be found in the License.htm file
* at the root of this distribution. If you can not locate the Shared Source License
* for DSL Editor PowerToy, please obtain a copy from: http://www.codeplex.com/dsltreegrideditor/Project/License.aspx.
* By using this source code in any fashion, you are agreeing to be bound by
* the terms of the Shared Source License for DSL Editor PowerToy.
*
* You must not remove this notice, or any other, from this software.
*
* **********************************************************************************/
using System;
using System.ComponentModel;
using System.Text;

namespace DslEditorPowerToy.Recipes.Converters
{
    public abstract class StringConverterBase : ConverterBase
    {
        StringConverter _converter = null;

        #region Constructors
        protected StringConverterBase()
            : base()
        {
            this._converter = new StringConverter();
        }
        #endregion

        #region Public Methods
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            return this._converter.CanConvertFrom(context, sourceType);
        }
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            return this._converter.ConvertFrom(context, culture, value);
        }
        #endregion

    }
}
